package com.lu.statistics.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lu.statistics.entity.SysAppMenuPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysAppMenuPermissionMapper extends BaseMapper<SysAppMenuPermission> {
    /**
     * 按权限ID统计菜单授权数量
     * @param permId
     * @return
     */
    int queryMenuPermissionCountByPermId(@Param("permId") int permId);

    /**
     * 按应用菜单ID查询权限ids
     * @param menuId
     * @return
     */
    List<Integer> queryPermIdsByMenuId(@Param("menuId") int menuId);
    /**
     * 按菜单批量删除权限与菜单关联信息
     * @param menuId
     */
    void deletePermissionByMenuId(@Param("menuId") int menuId);
}